package com.xiaozhen.alarm.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaozhen.alarm.domain.AlarmStrategy;

import java.util.List;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/10/25 9:21
 * @description:
 */
public interface AlarmStrategyService {

    /**
     * 查询策略列表
     *
     * @param page
     * @return
     */
    Page<AlarmStrategy> selectAlarmStrategyList(Page<AlarmStrategy> page);

    /**
     * 检测策略名称是否相同
     *
     * @param alarmStrategy
     * @return
     */
    Boolean checkStrategyNameUnique(AlarmStrategy alarmStrategy);

    /**
     * 添加策略
     *
     * @param alarmStrategy
     * @return
     */
    int insertAlarmStrategy(AlarmStrategy alarmStrategy);

    /**
     * 修改策略
     *
     * @param alarmStrategy
     * @return
     */
    int updateAlarmStrategy(AlarmStrategy alarmStrategy);

    /**
     * 删除策略
     *
     * @param strategyId
     * @return
     */
    int deleteAlarmStrategyById(Long strategyId);

    /**
     * 查询告警配置的策略
     *
     * @param configId
     * @return
     */
    List<AlarmStrategy> selectAlarmConfigStrategy(Long configId);
}
